Invalidates the current group invite code and generates a new one
Revoke the current invite code and generate a new one.
Authentication Required
Login to swap the placeholders with your real Instance ID and Access Token.
Log InNo query parameters required
This endpoint doesn't expect data in the URL.
Best practices
Automate revocation if you detect an influx of spam bots.
Notify legitimate waiting users that the link has changed.
Retracting the Welcome: The Strategic Power of Access Revocation
In the lifecycle of a growing community, the ability to open a door is only half of the governance required; the other half is the ability to change the lock. The Revoke Invite Code endpoint is your primary tool for Strategic Access Nullification and Perimeter Defense. It allows you to programmatically invalidate the current public-facing invite link (chat.whatsapp.com/...) and replace it with a fresh, secure token. This endpoint is the essential counterbalance to the Get Invite Code API, ensuring that your growth remains governed, your cohorts remain isolated, and your group's security perimeter can be rapidly reset in the event of an unauthorized link leak.
For enterprise architects, revocation is the act of Reclaiming the Gateway. This guide explores the strategic imperatives of token rotation and the enforcement of disciplined access lifecycles.
🏗️ Architectural Philosophy: The Invalidation of Public Tokens
From a technical perspective, revoking an invite code is an Atomically Destructive State Transition.
Key Architectural Objectives:
- Immediate Access Severance: The moment this call is executed, the old invite code is purged from Meta's global resolution directory. Any user who clicks on a legacy link will be met with an "Invite link has been reset" or "This group doesn't exist" message. This "Instant Blackhole" is critical for stopping an influx of unwanted participants who have discovered a link on an unauthorized forum or social media post.
- Mandatory Generation of the New State: A unique feature of this endpoint is that it doesn't just delete the old code; it Gives You the New One in the same response. This ensures that the group always has a functional invite path for your administrative systems, even as you retire the public-facing one.
- The Power of Admin Sovereignty: Revocation is a high-authority act. Your Wawp instance must be a Group Admin to execute this call. This prevents participants from trying to sabotage your growth funnels by maliciously resetting the link.
🚀 Strategic Use Case: Cohort Isolation and Campaign Discipline
Revocation should be integrated into your "Campaign Lifecycle" to handle transition phases and security incidents.
1. The "Campaign Decommissioning" Protocol
Marketing campaigns are often time-bound. A "Join our Black Friday VIP List" link should not be active in July. By programmatically calling the Revoke Invite Code endpoint at the end of a marketing window, you ensure that your "Black Friday" group doesn't continue to collect "Zombie Participants" who stumble upon the link months later. This allows you to "Seal the Cohort," ensuring that the group remains focused on the specific audience it was created for.
2. Rotational Security for High-Value Groups
For high-security operations (like a corporate whistleblower group or a high-value transaction hub), an invite link may be shared with a specific stakeholder via email. Once that stakeholder has Joined, the "One-Time Use" policy should be enforced. Your system can listen for the join webhook and immediately call the Revoke Invite Code endpoint to invalidate the link. This "Just-in-Time Revocation" ensures that the link cannot be forwarded or reused by unauthorized third parties.
3. Immediate "Bot Attack" Mitigation
If your system detects a sudden, rapid influx of unauthorized users (a common sign of a bot attack or a link leak), your "Breaker Logic" should trigger an immediate revocation. By resetting the link, you instantly "Shut the Gate," allowing your human moderation team to Prune the interlopers while your automated backend generates a new, secure link for legitimate distribution.
🔐 Administrative Mandate: Authority and Boundary Stewardship
In an enterprise setting, an invite link is a liability that must be actively managed.
Tracking the "Token Lineage"
Your backend should maintain a history of all invite codes generated for a specific group. This allows you to perform "Attribution Analysis"—if an unauthorized user joins, you can check which retired code they attempted to use (if the network permits) or at least know which "Campaign Window" was compromised. Revocation is the "Red Ink" in the audit log that marks the end of a specific access period.
Coordination with Physical Assets (Dynamic QRs)
If you are using dynamic QR codes in retail locations, ensure your QR generator is "Aware" of the revocation. When you rotate the code, your generator must update its target URL to the new code returned by the API. If your QR codes are static (printed on packaging), Do Not Revoke the Code unless it is a dire security emergency, as it will render all physical packaging useless. This illustrates the importance of using "Redirector Links" for any physical branding.
🛡️ Operational Best Practices: Professionalism and Graceful Transitions
- The "Notice of Reset" Pattern: If you are rotating a link that is currently being used by a legitimate partner or team, send them the new link before you revoke the old one to avoid "Access Gaps."
- Internal State Reconciliation: Upon successful revocation, update your internal database with the new code immediately. Any "Join Link" buttons on your website or dashboard must be synchronized to the new token to prevent a "Broken Link" experience for your customers.
- Avoid "Chatter" Revocation: Revoking a link multiple times in a few minutes is unnecessary and can lead to synchronization lag across Meta's global CDN. Stick to a "Schedule-Driven" or "Incident-Driven" rotation policy.
⚙️ Engineering Best Practices: The Validation Loop
- Verify Admin Status: Like all administrative tools, your request will fail with a 403 if your instance has been demoted. Implement a "Governance Watchdog" that ensures your instance's authority is verified before attempting high-security tasks like revocation.
- Graceful Response Handling: The API returns the new code in the success object. Ensure your code captures this value and propagates it to your marketing systems. A failure to update the link after a revocation is a self-inflicted "Denial of Service" attack on your own funnels.
- Webhook Integration: Listen for
group.updateevents. This allows your backend to detect if a human admin has revoked the link via the mobile app, ensuring your database and the network's reality are always aligned.
🎯 Conclusion: Mastering the Art of the Governed Access
The Revoke Invite Code endpoint is the "Security Shield" of your community architecture. It allows you to maintain absolute control over the gateways to your private conversations, enabling you to scale without fear of unauthorized access. By treating the invite link as a temporary, rotating token rather than a permanent asset, you build a conversational environment that is resilient, disciplined, and always aligned with your organization's highest standards of governance. You move beyond "Open-Door" policies and into the world of Managed Access Orchestration, where every entry is a choice and every link is a controlled instrument of growth.
Request Parameters
Configure the parameters required to interact with this endpoint. All query and body arguments are listed below with their details.
Request Body
Sent as a JSON objectstring | Your unique WhatsApp Instance ID Example: | ||
string | Your API Access Token Example: | ||
string | The unique ID of the group Example: |
Request Samples
Use these ready-to-go code snippets to integrate our API into your project quickly and efficiently. Choose your preferred language and library.
Expected Responses
Explore all possible responses and outcomes from the server. We have documented each status code with data examples to make success and error handling easier.
Example
{
"code": "NEW456DEF"
}Command Palette
Search for a command to run...